home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / OpenDoc 1.2b2c1 / OpenDoc / Interfaces / CPlusPlus / FocusSet.xh < prev    next >
Encoding:
Text File  |  1997-02-13  |  4.8 KB  |  221 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: FocusSet.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Classes defined in this interface
  13.  * 
  14.  */
  15.  
  16.  
  17. #ifndef SOM_ODFocusSet_xh
  18. #define SOM_ODFocusSet_xh
  19.  
  20. class ODFocusSet;
  21.  
  22. #define ODFocusSet_MajorVersion 1
  23. #define ODFocusSet_MinorVersion 0
  24.  
  25. /* C++ SOM defs */
  26. #include <somcls.xh>
  27. #include <somcm.xh>
  28.  
  29. /* C++ parent defs */
  30. #ifndef SOM_ODObject_xh
  31. #include <ODObject.xh>
  32. #endif
  33.  
  34. #ifndef ODFocusSet_API
  35. #define ODFocusSet_API
  36. /*
  37.  * -- The Class API
  38.  */
  39.  
  40. /*
  41.  * Start of user-defined types:
  42.  */
  43. class SOMClass;
  44. class SOMObject;
  45. class ODFrame;
  46. class ODFacet;
  47. class ODObject;
  48. class ODExtension;
  49. class ODFocusSet;
  50. class ODFocusSetIterator;
  51.  
  52. /*
  53.  * End of user-defined types.
  54.  */
  55.  
  56. #ifdef OLDIBMSOMAPISUPPORT
  57. #define ODFocusSetCClassData ODFocusSetClassData
  58. #define ODFocusSetNewClass(major,minor) somNewVersionedClassReference(ODFocusSet,major,minor)
  59. #endif
  60.  
  61. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  62. #define ODFocusSetMetaClass SOMClass
  63.  
  64. #if PRAGMA_ALIGN_SUPPORTED
  65. #  pragma options align=power
  66. #endif
  67.  
  68. /* The API to the ODFocusSet class object, and the methods it introduces. */
  69. SOMEXTERN struct ODFocusSetClassDataStructure {
  70. #ifdef OLDIBMSOMAPISUPPORT
  71.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  72. #else
  73.     long zero;
  74. #endif
  75.     somStaticClassInfo *sci;
  76.     somDToken        instanceDataToken;
  77.     long reserved [3];
  78.     somMToken Add;
  79.     somMToken Remove;
  80.     somMToken Contains;
  81.     somMToken CreateIterator;
  82.     somMToken reserved1;
  83.     somMToken reserved2;
  84.     somMToken reserved3;
  85.     somMToken reserved4;
  86.     somMToken reserved5;
  87.     somMToken reserved6;
  88. } SOMDLINK ODFocusSetClassData;
  89.  
  90. #if PRAGMA_ALIGN_SUPPORTED
  91. #  pragma options align=reset
  92. #endif
  93.  
  94. #if !defined(ODFocusSet_Class_Source) && !defined(SOM_Module_focusset_Source)
  95. #if PRAGMA_IMPORT_SUPPORTED
  96. #pragma import list ODFocusSetClassData
  97. #endif
  98. #endif
  99.  
  100.  
  101. /*
  102.  * -- Typedefs and inline method declarations for left path inherited methods
  103.  * -- are omitted because this compilation had -museinheritedmethods in effect
  104.  */
  105.  
  106.  
  107. /*
  108.  * -- Typedefs for ODFocusSet Method Procedures
  109.  */
  110. SOMEXTERN {
  111. typedef void   (* SOMLINK somTD_ODFocusSet_Add)(ODFocusSet *somSelf, Environment *ev,
  112.         ODTypeToken focus);
  113. typedef void   (* SOMLINK somTD_ODFocusSet_Remove)(ODFocusSet *somSelf, Environment *ev,
  114.         ODTypeToken focus);
  115. typedef ODBoolean   (* SOMLINK somTD_ODFocusSet_Contains)(ODFocusSet *somSelf, Environment *ev,
  116.         ODTypeToken focus);
  117. typedef ODFocusSetIterator*   (* SOMLINK somTD_ODFocusSet_CreateIterator)(ODFocusSet *somSelf, Environment *ev);
  118. }
  119.  
  120. #endif /* ODFocusSet_API */
  121.  
  122.  
  123. /*
  124.  * -- This emitter treats Method Tokens as Thunks by default.
  125.  * -- Use the sc modifier "nothunks" to change this default
  126.  */
  127. #undef somresolve_
  128. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  129.  
  130. /*
  131.  * -- The C++ Wrapper Class for ODFocusSet
  132.  */
  133. class ODFocusSet : public ODObject
  134. {
  135. public:
  136.  
  137. // ODFocusSet::new registers use of the class object, and then uses somNew
  138. // to allocate memory and load the object method table pointer. 
  139. void *operator new(size_t size)
  140. {
  141.     SOM_IgnoreWarning(size);
  142.     // Allocate memory using the default allocator for ODFocusSet, and
  143.     // clear mem & set method table pointer, call basic initialization
  144. #ifdef SOMCHKNULL
  145.     void * __somResult = (void *)
  146.       somNewObject(ODFocusSet);
  147.     SOMCHKNULL(__somResult);
  148.     return __somResult;
  149. #else
  150.     return (void*) somNewObject(ODFocusSet);
  151. #endif
  152. }
  153.  
  154. // ODFocusSet::delete uses the default deallocator for the object's class.
  155. void operator delete(void * obj)
  156. {
  157.     if (obj) {
  158.         SOM_Resolve(obj,SOMObject,somFree)
  159.            ( (SOMObject*) obj );
  160.     }
  161. }
  162.  
  163. /* method: Add */
  164. void   Add(Environment *ev,
  165.         ODTypeToken focus)
  166. {
  167.    SOM_ResolveD(this,ODFocusSet,ODFocusSet,Add)
  168.     (this,ev,focus);
  169. #ifdef SOMCHKEXCEPT
  170.       SOMCHKEXCEPT;
  171. #endif
  172. }
  173.  
  174. /* method: Remove */
  175. void   Remove(Environment *ev,
  176.         ODTypeToken focus)
  177. {
  178.    SOM_ResolveD(this,ODFocusSet,ODFocusSet,Remove)
  179.     (this,ev,focus);
  180. #ifdef SOMCHKEXCEPT
  181.       SOMCHKEXCEPT;
  182. #endif
  183. }
  184.  
  185. /* method: Contains */
  186. ODBoolean   Contains(Environment *ev,
  187.         ODTypeToken focus)
  188. {
  189.    #ifdef SOMCHKEXCEPT
  190.    ODBoolean __somResult = 
  191.       SOM_ResolveD(this,ODFocusSet,ODFocusSet,Contains)
  192.     (this,ev,focus);
  193.       SOMCHKEXCEPT;
  194.    return __somResult;
  195. #else
  196.    return SOM_ResolveD(this,ODFocusSet,ODFocusSet,Contains)
  197.     (this,ev,focus);
  198. #endif
  199. }
  200.  
  201. /* method: CreateIterator */
  202. ODFocusSetIterator*   CreateIterator(Environment *ev)
  203. {
  204.    #ifdef SOMCHKEXCEPT
  205.    ODFocusSetIterator* __somResult = 
  206.       SOM_ResolveD(this,ODFocusSet,ODFocusSet,CreateIterator)
  207.     (this,ev);
  208.       SOMCHKEXCEPT;
  209.    return __somResult;
  210. #else
  211.    return SOM_ResolveD(this,ODFocusSet,ODFocusSet,CreateIterator)
  212.     (this,ev);
  213. #endif
  214. }
  215.  
  216. };   /* ODFocusSet */
  217.  
  218.  
  219.  
  220. #endif       /* SOM_ODFocusSet_xh */
  221.